package com.Proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ProxyTestInvocationHandlerImpl implements InvocationHandler {

    private ProxyTest proxyTest;

    public void setProxyTest(ProxyTest proxyTest) {
        this.proxyTest = proxyTest;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("前置会话");
        Object object = method.invoke(proxyTest,args);
        System.out.println("后置会话");
        return object;

    }

}
